'use strict';

angular.module('swanApp')
    .controller('SessionDetailController', function ($scope, $rootScope, $stateParams, entity, Session, Space, Member, Event) {
                    $scope.session = entity;
                    $scope.load = function (id) {
                        Session.get({id: id}, function(result) {
                            $scope.session = result;
                        });
                    };
                    $rootScope.$on('swanApp:sessionUpdate', function(event, result) {
                        $scope.session = result;
                    });
                });
